package com.example.config;

import com.example.interceptor.CustomClientHttpRequestInterceptor;
import com.example.interceptor.JWTInterceptor;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.time.Duration;

/**
 * @Description: TODO
 * @Author runto
 * @Date 2023/11/5 23:35
 * @PackageName:com.example.config
 * @ClassName: WebConfig
 * @Version 1.0
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
//    //注册拦截器
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new JWTInterceptor())
//                .addPathPatterns("/user/**","/column/**","/order/**","/product/**")   //其他接口token验证
//                .excludePathPatterns("/user/login");  //所有用户都放心
//    }
}

